import $ from '../common';
Page({
  data: {
    titleHeight: $.gData().titleHeight,
    statuHeight: $.gData().statuHeight,
    // isIphoneX:$.gData().isIphoneX,
    ner:'',
  },
  textinput(e){
    const {ner}=this.data
    this.setData({
      ner:e.detail.value
    })
  },
  savehandle(){
    const {field,ner}=this.data
    let collect=field
    let data = {
      teacher_uuid: wx.getStorageSync('teacher_uuid'),
      campus_uuid: wx.getStorageSync('campus_uuid'),
    }
    data[collect] = ner
    $.post("/teacher/update", data, (res) => {
      wx.navigateBack({
        delta: -1,
      })
    })
  },
  onLoad(e) {
    const {title,field,ner}=e
    this.setData({
      title,
      field,
      ner
    })
  },
  onShow() {},
})